package com.inventive.jmscache.server;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.jms.QueueConnectionFactory;
import javax.jms.QueueConnection;
import javax.jms.JMSException;

/**
 * @author Grant Little <grant.little@coreservices.com.au>
 */
@Component
public class JmsCacheQueueConnectionFactory extends JmsCacheConnectionFactory implements QueueConnectionFactory {

    @Autowired
    private JmsCacheServer jmsCacheServer;

    public QueueConnection createQueueConnection() throws JMSException {
        return new JmsCacheQueueConnection(jmsCacheServer);
    }

    public QueueConnection createQueueConnection(String s, String s1) throws JMSException {
        return new JmsCacheQueueConnection(jmsCacheServer);
    }
}
